<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>趣味游戏</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
        }
        
        .container {
            max-width: 1000px;
            width: 100%;
            margin: 0 auto;
        }
        
        header {
            text-align: center;
            margin-bottom: 30px;
            padding: 20px;
        }
        
        h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }
        
        .subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
        }
        
        .game-area {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .game-board {
            flex: 1;
            min-width: 300px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(10px);
        }
        
        .game-screen {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 10px;
            height: 400px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            position: relative;
            overflow: hidden;
        }
        
        .player {
            width: 60px;
            height: 60px;
            background: #ff6b6b;
            border-radius: 50%;
            position: absolute;
            transition: all 0.2s ease;
            box-shadow: 0 0 15px rgba(255, 107, 107, 0.7);
        }
        
        .controls {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }
        
        .control-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 8px;
            color: white;
            padding: 12px;
            font-size: 1.2rem;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .control-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }
        
        .control-btn:active {
            transform: translateY(1px);
        }
        
        .game-info {
            flex: 1;
            min-width: 250px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(10px);
        }
        
        .stats {
            margin-bottom: 25px;
        }
        
        .stat {
            display: flex;
            justify-content: space-between;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .stat-value {
            font-weight: bold;
            color: #ffd166;
        }
        
        .achievements {
            margin-top: 20px;
        }
        
        .achievement {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
        }
        
        .achievement-icon {
            width: 40px;
            height: 40px;
            background: #06d6a0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
        }
        
        .action-buttons {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }
        
        .action-btn {
            flex: 1;
            padding: 15px;
            border: none;
            border-radius: 10px;
            font-size: 1.1rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .primary {
            background: #ff6b6b;
            color: white;
        }
        
        .secondary {
            background: rgba(255, 255, 255, 0.2);
            color: white;
        }
        
        .action-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }
        
        footer {
            text-align: center;
            margin-top: 30px;
            padding: 20px;
            opacity: 0.7;
            font-size: 0.9rem;
        }
        
        @media (max-width: 768px) {
            .game-area {
                flex-direction: column;
            }
            
            h1 {
                font-size: 2.2rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>趣味冒险游戏</h1>
            <p class="subtitle">探索未知世界，挑战你的极限！</p>
        </header>
        
        <div class="game-area">
            <div class="game-board">
                <div class="game-screen">
                    <div class="player" id="player"></div>
                </div>
                <div class="controls">
                    <button class="control-btn" id="up">↑</button>
                    <button class="control-btn" id="left">←</button>
                    <button class="control-btn" id="down">↓</button>
                    <button class="control-btn" id="right">→</button>
                    <button class="control-btn" id="actionA">A</button>
                    <button class="control-btn" id="actionB">B</button>
                </div>
            </div>
            
            <div class="game-info">
                <div class="stats">
                    <h2>游戏状态</h2>
                    <div class="stat">
                        <span>等级</span>
                        <span class="stat-value">5</span>
                    </div>
                    <div class="stat">
                        <span>分数</span>
                        <span class="stat-value">1,250</span>
                    </div>
                    <div class="stat">
                        <span>生命值</span>
                        <span class="stat-value">3/5</span>
                    </div>
                    <div class="stat">
                        <span>能量</span>
                        <span class="stat-value">78%</span>
                    </div>
                    <div class="stat">
                        <span>游戏时间</span>
                        <span class="stat-value">12:45</span>
                    </div>
                </div>
                
                <div class="achievements">
                    <h2>成就</h2>
                    <div class="achievement">
                        <div class="achievement-icon">★</div>
                        <div>
                            <div>首次游戏</div>
                            <div style="font-size: 0.8rem; opacity: 0.8;">完成你的第一场游戏</div>
                        </div>
                    </div>
                    <div class="achievement">
                        <div class="achievement-icon">★</div>
                        <div>
                            <div>收集者</div>
                            <div style="font-size: 0.8rem; opacity: 0.8;">收集10个物品</div>
                        </div>
                    </div>
                </div>
                
                <div class="action-buttons">
                    <button class="action-btn primary" id="startBtn">开始游戏</button>
                    <button class="action-btn secondary" id="resetBtn">重置</button>
                </div>
            </div>
        </div>
        
        <footer>
            <p>© 2023 趣味游戏 | 设计用于演示目的</p>
        </footer>
    </div>

    <script>
        // 获取玩家元素
        const player = document.getElementById('player');
        
        // 初始玩家位置
        let playerX = 200;
        let playerY = 200;
        
        // 更新玩家位置
        function updatePlayerPosition() {
            player.style.left = `${playerX}px`;
            player.style.top = `${playerY}px`;
        }
        
        // 控制按钮事件
        document.getElementById('up').addEventListener('click', () => {
            playerY = Math.max(playerY - 20, 20);
            updatePlayerPosition();
        });
        
        document.getElementById('down').addEventListener('click', () => {
            playerY = Math.min(playerY + 20, 380);
            updatePlayerPosition();
        });
        
        document.getElementById('left').addEventListener('click', () => {
            playerX = Math.max(playerX - 20, 20);
            updatePlayerPosition();
        });
        
        document.getElementById('right').addEventListener('click', () => {
            playerX = Math.min(playerX + 20, 480);
            updatePlayerPosition();
        });
        
        // 动作按钮
        document.getElementById('actionA').addEventListener('click', () => {
            player.style.transform = 'scale(1.2)';
            setTimeout(() => {
                player.style.transform = 'scale(1)';
            }, 200);
        });
        
        document.getElementById('actionB').addEventListener('click', () => {
            player.style.backgroundColor = '#06d6a0';
            setTimeout(() => {
                player.style.backgroundColor = '#ff6b6b';
            }, 500);
        });
        
        // 开始和重置按钮
        document.getElementById('startBtn').addEventListener('click', () => {
            alert('游戏开始！使用方向键控制角色移动。');
        });
        
        document.getElementById('resetBtn').addEventListener('click', () => {
            playerX = 200;
            playerY = 200;
            updatePlayerPosition();
            alert('游戏已重置！');
        });
        
        // 初始化玩家位置
        updatePlayerPosition();
    </script>
</body>
</html>